package com.example.demo.service.impl;

import com.example.demo.domain.Class;
import com.example.demo.mapper.ClassMapper;
import com.example.demo.service.ClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassServiceImpl implements ClassService {

    @Autowired
    public ClassMapper classMapper;

    @Override
    public boolean delete(Integer cid,Integer id) {
      return classMapper.delete(cid,id);
    }


    @Override
    public List<Class> findAll(Integer pageNum, Integer pageSize) {
        return classMapper.findAll(pageNum,pageSize);
    }

    @Override
    public Integer findTotalRecord() {
        return classMapper.findTotalRecord();
    }

    @Override
    public boolean add(Class classes) {
        return classMapper.add(classes);
    }

    @Override
    public Class findClassByCid(Integer cid,Integer id) {
        return classMapper.findClassByCid(cid,id);
    }

    @Override
    public void update(Class classes) {
        classMapper.update(classes);
    }




}
